package DB;

public class DatabaseTables {
	public  Table phrases;
	public Table manualArticles;
	public Table users;
	public Table views;
	public Table categories;
	public static DatabaseTables instance = null;
	
	public static DatabaseTables getInstance(){
		if (instance == null){
			instance = new DatabaseTables();
		}
		return instance;
	}
	
	private DatabaseTables(){
		phrases = new Table();
		phrases.name = "phrases";
		phrases.columns = new String[]{"phraseId","name","category","hint","version","matchingManualArticleId"};
		
		users = new Table();
		users.name = "users";
		users.columns = new String[]{"username","password","topScore","accumulateScore"};
		
		manualArticles = new Table();
		manualArticles.name = "manualarticles";
		manualArticles.columns = new String[]{"manualArticlesId","matchingPhraseId","manualArticle","updater"};
		
		views = new Table();
		views.name = "";
		views.columns = new String[]{"phraseId", "name", "category", "hint", "manualArticle", "updater"};
		
		categories = new Table();
		categories.name = "categories";
		categories.columns = new String[]{"categoryName","tableURL","hintColumn","hintPrefix"};
	}
	
	public class Table {
		public  String[] columns;
		public  String name;
	}                    
}
